import 'package:flutter_base/common/entitys/entitys.dart';
import 'package:flutter_base/common/utils/utils.dart';
import 'package:flutter_base/common/values/values.dart';
import 'package:flutter/material.dart';

/*设置个人签名相关*/
class SignatureAPI {
  ///获取个人签名
  static Future<SignPicModel> getSignature({
    required BuildContext context,
    params,
    bool refresh = false,
    bool cacheDisk = false,
  }) async {
    var response = await HttpUtil().get(
      '/zjl/api/auth/base/userinfo/getSignPic',
      context: context,
      params: params,
      refresh: refresh,
      cacheDisk: cacheDisk,
      cacheKey: STORAGE_INDEX_NEWS_CACHE_KEY,
    );
    return SignPicModel.fromJson(response);
  }


  ///设置个人签名
  static Future<BaseResponseEntity> setSignPic({
    required BuildContext context,
    params,
  }) async {
    var response = await HttpUtil().put(
        '/zjl/api/auth/base/userinfo/setSignPic',
        context: context,
        params: params);
    return BaseResponseEntity.fromJson(response);
  }
}
